package com.medata.service.impl;

import com.medata.dataObject.HotWords;
import com.medata.repository.HotWordsRepository;
import com.medata.service.HotWordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ：zb
 * @date ：Created in 2019/7/23 0023 10:18
 * @description：
 */
@Service
public class HotWordsServiceImpl implements HotWordsService {
    @Autowired
    private HotWordsRepository repository;

    @Override
    public List<HotWords> topHotFind() {
        return repository.topHotFind();
    }

    @Override
    public HotWords findByHotWord(String hotWord) {
        return repository.findByHotWord(hotWord);
    }

    @Override
    public void saveOrUpdate(HotWords hotWords) {
        repository.save(hotWords);
    }
}
